<?php
/**
 * AlipayConfig.php
 *
* 跨境电商商城系统
 * =============================================
 * Copy right 2016-2026 大连熠泽科技网络有限公司
 * ---------------------------------------------
 * 官方网址: http://www.yizehuitong.com
 * =============================================
 * @author : yizehuitong
 * @date : 2019.10
 * @version : v2.0
 */

namespace addons\NsAlipay\data\service;

use data\service\BaseService;

/**
 * 支付宝验证
 */
class AliPayVerify extends BaseService
{
	
	public function aliPayClass()
	{
		$alipay_config = new AlipayConfig();
		$config_info = $alipay_config->getAliPayVersion(0);
		if (empty($config_info)) {
			$is_old = 0;
		} else {
			$data = json_decode($config_info["value"], true);
			$is_old = $data["is_use"];
		}
		if ($is_old == 0) {
			$class = new AliPay();
		} else {
			$class = new AliPayNew();
		}
		return $class;
		
	}
	
}